<h4>Manage Fields for Particulars of Nominating Party<br>
		<span style="font-size:12px;">(  Check the checkbox to indicate the field to be shown upon candidate viewing.)</span>
</h4>
	<!--row starts-->
	<div class="row1">
		<div class="form-group col-sm-12">
			<div class="table-responsive add_fields">
				<table cellpadding="0" cellspacing="0" border="0" class="table">
					<?php if(isset($nomination_form_nominant) && !empty($nomination_form_nominant)){
						foreach($nomination_form_nominant as $key => $temp){
							$personal[$key]['id']=$temp['master_nomination_id'];
							$personal[$key]['label']=$temp['master_nomination_form_label'];
							$personal[$key]['name']=$temp['master_nomination_form_name'];
							$personal[$key]['man']=$temp['master_nomination_form_mandatory'];
						}
						for($i=0;$i<=4;$i++){
							$n = $i*2;
							$m = $n+1;
					 ?>
					<tr>
						<?php if(isset($personal[$n]['name'])){ ?>
						<td>
							<label for="<?php echo $personal[$n]['name']; ?>" class="form_text"><?php echo $personal[$n]['label']; if($personal[$n]['man'] == 'Yes'){ ?><span class="asterisk">*</span><?php } ?></label>
							<input id="<?php echo $personal[$n]['name']; ?>" name="<?php echo $personal[$n]['name']; ?>" type="checkbox" <?php
								if ($personal[$n]['man'] == 'Yes') { echo 'checked';
								} else if(isset($Nominating_field_data['label']) && in_array($personal[$n]['label'],$Nominating_field_data['label'])){ echo 'checked'; }
 ?> value="id="<?php echo $personal[$n]['label']; ?>"" />
							<label for="<?php echo $personal[$n]['name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $personal[$n]['name']; ?>_id" value="<?php echo $personal[$n]['id']; ?>" >
						</td>
						<?php }
							if(isset($personal[$m]['name'])){
						?>
						<td>
							<label for="<?php echo $personal[$m]['name']; ?>" class="form_text"><?php echo $personal[$m]['label']; if($personal[$m]['man'] == 'Yes'){ ?><span class="asterisk">*</span><?php } ?></label>
							<input id="<?php echo $personal[$m]['name']; ?>" name="<?php echo $personal[$m]['name']; ?>" type="checkbox" <?php if ($personal[$m]['man'] == 'Yes') { echo 'checked';} else if(isset($Nominating_field_data['label']) && in_array($personal[$m]['label'],$Nominating_field_data['label'])){ echo 'checked';} ?> <?php
								if ($personal[$m]['label'] == 'Email') { echo 'disabled';
								}
 ?> value="<?php echo $personal[$m]['label']; ?>" />
							<label for="<?php echo $personal[$m]['name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $personal[$m]['name']; ?>_id" value="<?php echo $personal[$m]['id']; ?>" >
						</td>
						<?php }else{ echo '<td></td>';} ?>
					</tr>
					<?php }} ?>
				</table>

				<h5 class="main_heading">Extra Fields</h5>
				<table cellpadding="0" cellspacing="0" border="0" class="table">
					<?php if(isset($nomination_form_nominant_extra) && !empty($nomination_form_nominant_extra)){
						foreach($nomination_form_nominant_extra as $key => $temp){
					 ?>		
					<tr>
						<td>
							<label for="<?php echo $temp['master_nomination_form_name']; ?>" class="form_text"><?php echo substr($temp['master_nomination_form_label'], 3); ?> :</label>
							<input id="<?php echo $temp['master_nomination_form_name']; ?>" name="<?php echo $temp['master_nomination_form_name']; ?>_text" type="text" value="<?php if(isset($Nominating_field_data['field_id'])  && in_array($temp['master_nomination_id'],$Nominating_field_data['field_id'])){ echo $Nominating_field_data['label'][$temp['master_nomination_id']]; }?>" />
                            <input type="hidden" name="<?php echo $temp['master_nomination_form_name']; ?>_id" value="<?php echo $temp['master_nomination_id']; ?>" >
						</td>
						<td>
							<input id="<?php echo $temp['master_nomination_form_name']; ?>" name="<?php echo $temp['master_nomination_form_name']; ?>" <?php  if (isset($Nominating_field_data['field_id']) && in_array($temp['master_nomination_id'],$Nominating_field_data['field_id'])){ echo 'checked'; }?> type="checkbox" />
							<label for="<?php echo $temp['master_nomination_form_name']; ?>">Show text field</label>
							&nbsp;&nbsp;&nbsp;&nbsp;
							<input id="<?php echo $temp['master_nomination_form_name']; ?>_1" name="<?php echo $temp['master_nomination_form_name']; ?>_1" type="checkbox" <?php if(isset($Nominee_field_data['mandatory'][$temp['master_nomination_id']]) && $Nominee_field_data['mandatory'][$temp['master_nomination_id']]=='Yes') { echo 'checked'; } ?> >
                            <label for="<?php echo $temp['master_nomination_form_name']; ?>_1" class="label_text">Mandatory</label>
						</td>
					</tr>
					<?php }} ?>
				</table>
			</div>
		</div>
		<div class="clearfix"></div>
	</div>
	<!--row closed-->